package model

import (
	"encoding/json"
	"time"
)

type Flyway struct {
	InstalledRank int       `json:"installed_rank"`
	Version       string    `json:"version"`
	Description   string    `json:"description"`
	Type          string    `json:"type"`
	Script        string    `json:"script"`
	Checksum      int       `json:"checksum"`
	InstalledBy   string    `json:"installed_by"`
	InstalledOn   time.Time `json:"installed_on"`
	ExecutionTime int       `json:"execution_time"`
	Success       int8      `json:"success"`
}

func (f *Flyway) String() string {
	jd, _ := json.Marshal(f)
	return string(jd)
}
